﻿@using WaterRevenueMS.Domain.ViewModels.Authen.User
@using WaterRevenueMS.Domain.Common.Models
@model UpdateUserModel
@using (Html.BeginForm("Edit", "User", FormMethod.Post, new { @class = "form-horizontal", @id = "modal-content" }))
{
@Html.HiddenFor(t => t.Id)

<!-- Nav tabs -->
<ul class="nav nav-tabs">
    <li class="active"><a href="#base" data-toggle="tab">基本信息</a></li>
    <li><a href="#role" data-toggle="tab">角色</a></li>
</ul>

<!-- Tab panes -->
<div class="tab-content">
    <div class="tab-pane active" id="base">
        <div class="control-group">
            <label class="control-label-form">
                用户名 :
            </label>
            <div class="controls">
                <label class="label-text">
                    @Model.LoginName
                </label>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label-form">
                选择所属公司 :         
            </label>
            <div class="controls">
                @Html.DropDownListFor(t => t.CompanyId, Model.CompanyItemList, new { @class = "form-control" })             
            </div>
        </div>
        <div class="control-group">
            <label class="control-label-form">
                电子邮件 :
            </label>
            <div class="controls">
                <label class="label-text">
                    @Model.Email
                </label>
            </div>
        </div>

        <div class="control-group">
            <label class="control-label-form">
                <label class="red">*</label>姓名 :
            </label>
            <div class="controls">
                @Html.TextBoxFor(t => t.FullName, new { @class = "form-control" })
                @Html.ValidationMessageFor(m => m.FullName)
            </div>
        </div>

        <div class="control-group">
            <label class="control-label-form">
                电话号码 :
            </label>
            <div class="controls">
                @Html.TextBoxFor(t => t.Phone, new { @class = "form-control" })
            </div>
        </div>

        <div class="control-group">
            <label class="control-label-form">
                注册时间 :
            </label>
            <div class="controls">
                <label class="label-text">
                    @Model.RegisterTime
                </label>
            </div>
        </div>

        <div class="control-group">
            <label class="control-label-form">
                最后登陆时间 :
            </label>
            <div class="controls">
                <label class="label-text">
                    @Model.LastLoginTime
                </label>
            </div>
        </div>

        <div class="control-group">
            <label class="control-label-form">
                是否激活 :
            </label>
            <div class="controls">
                @Html.CheckBoxFor(t => t.Enabled)
            </div>
        </div>

    </div>
    <div class="tab-pane" id="role">
        @Html.CheckBoxListFor(t => t.SelectedRoleList, DisplayDirection.Horizon, new { style = "display:inline-block;width:500px;margin:0 10px;" }, new { style = "display:inline-block;width:120px;" })
    </div>
</div>
}